package assignment.work02;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Work02 {
	public static void main(String[]args) {
		ApplicationContext app1 =  new ClassPathXmlApplicationContext("applicationContext-work02.xml");
		//注解装配
		Work02Class1 work02Class11=app1.getBean(Work02Class1.class);
		work02Class11.echo1();
		//XML装配
		Work02Class2 work02Class21=app1.getBean(Work02Class2.class);
		work02Class21.echo2();
		//配置类装配
		ApplicationContext app2 = new AnnotationConfigApplicationContext(Work02Class3Config.class);
		Work02Class3 work02Class3=app2.getBean(Work02Class3.class);
		work02Class3.echo3();
	}
}
